
package data; 

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.sql.*;

/**
 *
 * @author Alejandro
 */
public class ReporteFinalAction extends org.apache.struts.action.Action {

    private static final String SUCCESS = "success";

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        ReporteFinalForm myForm = (ReporteFinalForm) form;
        String reporte = myForm.getReporte();
        
        BitacoraDataMapper mapper = new BitacoraDataMapper();
        mapper.actualizarReporte(request.getSession().getAttribute("BitID").toString(), reporte);
        
        
        return mapping.findForward(SUCCESS);
    }
}
